package com.mysql.jdbc;

import java.sql.SQLException;
import java.util.HashMap;
import java.util.Map;



/**
 * @author  JYM
 * 2016-4-26 上午9:46:08
 */
public class ObjectMapRow  extends ResultSetMapRow{
	
	
	HashMap<Integer, Object>  internalRowDataMap;
	/**
	 * @param exceptionInterceptor
	 */
/*	protected ObjectMapRow(HashMap<Integer, Object>  internalRowDataMap,ExceptionInterceptor exceptionInterceptor) {
		super(exceptionInterceptor);
		this.internalRowDataMap=internalRowDataMap;
	}
	*/
	
	
	



	@Override
	public Object getColumnValue(int index) throws SQLException {
		
		return  this.internalRowDataMap.get(index);
	}
	
	
	@Override
	public void setColumnValue(int index, Object value) throws SQLException {
		this.internalRowDataMap.put(index, value);
		
	}


	
	@Override
	public int getMapSize() {
		 if (this.internalRowDataMap == null) {
	            return 0;
	        }

	        int mapSize = 0;

	        mapSize=this.internalRowDataMap.size();

	        return mapSize;
	  
	}


	
	@Override
	public boolean isNull(int index) throws SQLException {
		boolean flag=false;
		if (this.internalRowDataMap.get(index)==null) {
			flag=true;
		}
		if (this.internalRowDataMap.get(index)!=null) {
			flag=false;
		}
		
		return flag;
		
	}

	

}
